package br.com.ustore.agent.backup.domain;

import java.util.Map;
import java.util.Observable;

import org.apache.activemq.transport.nio.SelectorManager.Listener;
import org.apache.activemq.transport.nio.SelectorSelection;
import org.apache.log4j.Logger;
import org.springframework.util.StopWatch;

import com.sun.java.browser.net.ProxyService;

/**
 * @author rma1
 * 
 */
@SuppressWarnings("unchecked")
public class SimplePeerController extends Observable implements Listener {

	private StopWatch swTime;

	private static final Logger LOGGER = Logger.getLogger(SimplePeerController.class.getName());

	protected String login;

	protected String passwd;
	
	private boolean started = false;
	
	private Integer peerType;

	protected String authenticationCode;
	
	private Long userId;

	private Map<Long,Long> fileVisbility;

	private String path;

	private String restorePath;

	private int numberOfChunks;

	protected volatile ProxyService proxy;
	
	private boolean canReauthenticate;

	private String selectedGUI;

	private Long totalSpace = null;

	private static boolean testing;

	private static boolean isRunningTest;

	private Long usedBytes;

	/**
	 * Diferença da hora entre o servidor e o cliente para ser utilizado na
	 * sincronização das atualizações
	 */
	private long diffTimeServerClient;

	private long sendTime;
	
	public SimplePeerController() {
		
	}

	public void onError(SelectorSelection arg0, Throwable arg1) {
	}

	public void onSelect(SelectorSelection arg0) {
	}
}
